import { 
    Entity, 
    PrimaryGeneratedColumn, 
    Column,
    Index 
} from 'typeorm';

@Entity({ 
    name: 'ya_system_user_attributes',
    engine: 'InnoDB',
    comment: '用户属性关联'
})
export class SystemUserAttributes {
    @PrimaryGeneratedColumn({ 
        type: 'int', 
        name: 'id',
        comment: 'id'
    })
    id: number;

    @Column({ 
        type: 'int', 
        name: 'user_id',
        default: 0,
        comment: '用户id'
    })
    userId: number;

    @Column({ 
        type: 'int', 
        name: 'dept_id',
        default: 0,
        comment: '部门id'
    })
    deptId: number;

    @Column({ 
        type: 'int', 
        name: 'post_id',
        default: 0,
        comment: '职位id'
    })
    postId: number;

    @Column({ 
        type: 'int', 
        name: 'role_id',
        default: 0,
        comment: '角色id'
    })
    roleId: number;
}